<!--第二张-->
<style lang="scss" scoped>
  .app-container {
    p {
      font-size: 18px;
      font-weight: 400;
      color: #11263C;
      border-left: 3px solid rgba(84, 91, 245, 1);
      padding-left: 10px;
      margin-bottom: 15px;
    }

    /*搜索区域*/
    .el-form {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      border-radius: 10px;
      background: #fff;
      box-shadow: 0px 20px 45px rgba(240, 237, 246, 0.5);
      padding: 10px 20px 0 20px;
      margin-bottom: 20px;

      .el-form-item {
        margin-bottom: 10px;

        ::v-deep .el-form-item__label {
          font-size: 14px;
          font-weight: 400;
          line-height: 32px;
          color: rgba(3, 2, 2, 1);
          text-align: right;
        }

        ::v-deep .el-form-item__content {

          .el-input {
            width: 165px;

            .el-input__inner {
              width: 165px;
              border: 1px solid rgba(127, 127, 213, 0.5);
              border-radius: 10px;
            }
          }

          .el-button {
            height: 32px;
            border-radius: 2px;
            background: linear-gradient(268.09deg, rgba(96, 103, 250, 1) 0%, rgba(119, 153, 252, 1) 100%);
            padding: 8px 18px;
            color: #fff;
            border: none;
            margin-left: 25px;

            &:hover {
              border: none;
              background: linear-gradient(268.09deg, rgb(69, 78, 255) 0%, rgb(88, 130, 255) 100%);
            }

            &:nth-child(1) {
              width: 60px;
              height: 32px;
              opacity: 1;
              border-radius: 2px;
              background: rgba(242, 243, 245, 1);
              color: rgba(0, 0, 0, 0.3);
              padding: 8px 16px;

              &:hover {
                border: none;
                background: rgb(228, 228, 228);
              }
            }
          }
        }
      }
    }

    /*统计区域*/
    .card-bg {
      display: flex;
      justify-content: space-around;
      align-items: center;
      height: 180px;
      background: #fff;
      border-radius: 10px;

      .quarter-r {
        .money {
          display: block;
          font-size: 24px;
          font-weight: 500;
          line-height: 28px;
          color: rgba(3, 2, 2, 1);
          text-align: right;
          margin-bottom: 20px;
        }

        .desc {
          display: block;
          font-size: 14px;
          font-weight: 400;
          line-height: 16px;
          color: rgba(188, 195, 212, 1);
          text-align: right;
        }
      }
    }

    .sale {
      background: #fff;
      border-radius: 10px;
      padding: 15px 20px;

      p {
        font-size: 18px;
        font-weight: 400;
        line-height: 28px;
        color: rgba(17, 38, 60, 1);
        border-left: 4px solid #545BF5;
        margin: 0 0 15px 0;
      }

      .bar {
        .bar-item {
          display: flex;
          align-items: center;
          margin-bottom: 8px;

          .bar-time {
            width: 140px;
            font-size: 12px;
            font-weight: 400;
            line-height: 14.06px;
            color: rgba(85, 87, 112, 1);
          }

          .bar-con {
            flex: 1;

            ::v-deep.el-progress-bar__inner {
              text-align: left;
              padding-left: 8px;
              background: linear-gradient(to right, #7799FC, #6169FA);
            }
          }
        }
      }

      .count {
        display: flex;
        flex-wrap: wrap;

        .count-item {
          flex: 50%;

          .sales, .from {
            display: flex;
            justify-content: center;
            align-items: center;
            overflow: hidden;
          }

          .child {
            display: flex;
            flex-wrap: wrap;

            .child-item {
              flex: 50%;
              display: flex;
              flex-direction: column;
              align-items: center;
              justify-content: center;

              label {
                margin-bottom: 6px;
                font-size: 14px;
                font-weight: 400;
                color: rgba(188, 195, 212, 1);
              }

              span {
                font-size: 20px;
                font-weight: 600;
                line-height: 28.13px;
                color: rgba(3, 2, 2, 1);
              }
            }
          }
        }
      }

      /*列表*/
      .list {
        display: flex;
        justify-content: space-between;

        .list-l, .list-r {
          flex: 1;

          .list-l-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            height: 30px;
            line-height: 30px;
            padding: 0 23px 0 30px;

            .list-l-item-start {
              display: flex;
              align-items: center;

              img {
                width: 19px;
                height: 22px;
              }

              .rank {
                font-size: 18px;
                font-weight: 700;
                line-height: 21px;
                color: rgba(138, 138, 138, 1);
              }

              .name {
                margin-left: 13px;
                font-size: 14px;
                font-weight: 500;
                line-height: 16.41px;
                color: rgba(94, 129, 244, 1);
              }
            }

            .list-l-item-end {
              font-size: 14px;
              font-weight: 500;
              line-height: 16.41px;
              color: rgba(94, 129, 244, 1);
            }
          }
        }

        .list-r {
          margin-left: 27px;
        }
      }
    }

    .mb20 {
      margin-bottom: 20px;
    }

    .pl0 {
      padding-left: 0 !important;
    }

    .pr0 {
      padding-right: 0 !important;
    }
  }
</style>

<template>
  <div class="app-container">
    <p>收卖数据报表</p>

    <!--搜索区域-->
    <el-form size="small" :inline="true" label-width="70px">
      <el-form-item label="选择时间" prop="orderDate">
        <el-input/>
      </el-form-item>

      <el-form-item label="选择时间" prop="orderDate">
        <el-input/>
      </el-form-item>

      <el-form-item style="display: flex;">
        <el-button size="mini">重置</el-button>
        <el-button type="primary" size="mini">筛选</el-button>
        <el-button type="danger" size="mini">刷新</el-button>
      </el-form-item>
    </el-form>

    <!--统计第一排-->
    <el-row :gutter="20" style="margin: 0;">
      <!--左侧-->
      <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12" class="mb20 pl0">
        <div class="sale">
          <p>销售数据看板</p>
          <div class="list">
            <div class="list-l">
              <div class="list-l-item" v-for="(item,indx) in 8" :style="{'background':indx%2 == 1?'':'#F2F6FF'}">
                <div class="list-l-item-start">
                  <!--<img src="" alt="">-->
                  <span class="rank">{{indx +1}}</span> <span class="name">王者荣耀</span>
                </div>
                <div class="list-l-item-end">8个</div>
              </div>
            </div>
            <div class="list-r">
              <div class="list-l-item" v-for="(item,indx) in 8" :style="{'background':indx%2 == 1?'':'#F2F6FF'}">
                <div class="list-l-item-start">
                  <!--<img src="" alt="">-->
                  <span class="rank">{{indx +1}}</span> <span class="name">王者荣耀</span>
                </div>
                <div class="list-l-item-end">8个</div>
              </div>
            </div>
          </div>
        </div>
      </el-col>

      <!--右侧-->
      <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12" class="mb20 pr0">
        <div class="sale">
          <p>回收数据看板</p>
          <div class="list">
            <div class="list-l">
              <div class="list-l-item" v-for="(item,indx) in 8" :style="{'background':indx%2 == 1?'':'#F2F6FF'}">
                <div class="list-l-item-start">
                  <!--<img src="" alt="">-->
                  <span class="rank">{{indx +1}}</span> <span class="name">王者荣耀</span>
                </div>
                <div class="list-l-item-end">8个</div>
              </div>
            </div>
            <div class="list-r">
              <div class="list-l-item" v-for="(item,indx) in 8" :style="{'background':indx%2 == 1?'':'#F2F6FF'}">
                <div class="list-l-item-start">
                  <!--<img src="" alt="">-->
                  <span class="rank">{{indx +1}}</span> <span class="name">王者荣耀</span>
                </div>
                <div class="list-l-item-end">8个</div>
              </div>
            </div>
          </div>
        </div>
      </el-col>
    </el-row>

    <!--第二排-->
    <el-row :gutter="20" style="margin: 0;">
      <!--左侧-->
      <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12" class="mb20 pl0">
        <div class="sale">
          <el-row class="count">
            <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
              <div class="count-item mb20">
                <p>回收数据</p>
                <div class="child">
                  <div class="child-item">
                    <label>总个数</label> <span>23</span>
                  </div>
                  <div class="child-item">
                    <label>总金额</label> <span>￥123123</span>
                  </div>
                </div>
              </div>
            </el-col>
            <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
              <div class="count-item mb20">
                <p>销售数据</p>
                <div class="child">
                  <div class="child-item mb20">
                    <label>总销售金额</label> <span>23</span>
                  </div>
                  <div class="child-item mb20">
                    <label>总数量</label> <span>￥123123</span>
                  </div>
                  <div class="child-item">
                    <label>出售自营号</label> <span>￥123123</span>
                  </div>
                  <div class="child-item">
                    <label>提合作商号</label> <span>￥123123</span>
                  </div>
                </div>
              </div>
            </el-col>
          </el-row>
          <el-row>
            <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
              <div class="count-item">
                <p>账号来源分布</p>
                <div class="from">
                  <saleEcharts></saleEcharts>
                </div>
              </div>
            </el-col>
            <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
              <div class="count-item">
                <p>销售渠道分布</p>
                <div class="sales">
                  <fromEcharts></fromEcharts>
                </div>
              </div>
            </el-col>
          </el-row>
        </div>
      </el-col>

      <!--右侧-->
      <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12" class="pr0">
        <div class="sale">
          <p>单品销售利润看板</p>
          <div class="bar">
            <div class="bar-item" v-for="item in 10">
              <div class="bar-time">2023/9/28星期一</div>
              <div class="bar-con">
                <el-progress :text-inside="true" text-color="#fff" :stroke-width="28" :percentage="70"
                             define-back-color="transparent" :format="format"/>
              </div>
            </div>
          </div>
        </div>
      </el-col>
    </el-row>
  </div>
</template>

<script>
    import saleEcharts from "./components/saleEcharts";
    import fromEcharts from "./components/fromEcharts";

    export default {
        components: {saleEcharts, fromEcharts},
        data() {
            return {}
        },
        created() {

        },
        methods: {
            format() {
                return "今日事，今日毕"
            }
        }
    }
</script>
